package com.fqgj.sentry.manage.dao;

import com.fqgj.common.base.BaseMapper;
import com.fqgj.sentry.manage.entity.McRolePermissionEntity;

import java.util.List;

/**
 * User: ykpbean
 * Date: 2017-07-12
 * Time: 14:21:02.938
 */

public interface McRolePermissionDao extends BaseMapper<McRolePermissionEntity> {
    Integer deleteByRoleId(Long roleId);

    /**
     * 根据角色查询 权限集合
     *
     * @param roleId
     * @return
     */
    List<McRolePermissionEntity> findListByRoleId(Long roleId);

    /**
     * distinct 权限去重 根据rolesId查权限
     *
     * @param rolesId
     * @return
     */
    List<McRolePermissionEntity> selectListByRolesId(String rolesId);

    /**
     * 根据角色id
     *
     * @param roleId
     * @return
     */
    List<McRolePermissionEntity> findPermissionMenuList(Long roleId);
}